<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<link rel="stylesheet" type="text/css" href="../css/icon.css"/>
		<link rel="stylesheet" type="text/css" href="../css/style.css"/>
		<script src="../js/jquery-1.12.2.min.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<!--左 -->
		<div class="bodyleft font">
			<div class="bh-title font">后台管理系统</div>
			<div class="shouye">首页</div>
			<ul id="btnall">
				<li id="btn" flag='1'><span class="iconfont icon-tishi"></span><em>权限管理</em>
					<ul class="hidden">
						<li><a href="#" class="font">管理员列表</a></li>
						<li><a href="#" class="font">新增管理员</a></li>
						<li><a href="#" class="font">更改密码</a></li>
						<li><a href="#" class="font">删除管理员</a></li>
					</ul>				
				</li>
				<li id="btn" flag='1'><span class="iconfont icon-tishi"></span><em>商品管理</em>
					<ul class="hidden">
						<li><a href="#" class="font">商品列表</a></li>
						<li><a href="#" class="font">新增商品</a></li>
						<li><a href="#" class="font">编辑商品</a></li>
						<li><a href="#" class="font">删除商品</a></li>
					</ul>	
				</li>
				<li id="btn">订单管理</li>
				<li id="btn">会员管理</li>
				<li id="btn">系统管理</li>
			
			</ul>
		</div>
		<!--上-->
		<div class="bodyheader w">
			<div class="box">
				<div class="naolin iconfont icon-tishi1"></div>
				<div class="xian"></div>
			<div class=""><span class="iconfont icon-user"></span>用户</div>
			</div>
			
		</div>
		<!--右-->
		<div class="bodyright">
			<div class="righttitle">
				<div>新增商品</div>
				
			</div>
			<div class="content">
				<div class="admin-form">
					<form action="" method="">
                        <span id="">客户id：</span><input type="text" name="" id="" /><br/>
                        <span id="">客户名称：</span><input type="text" name="" id="" /><br/>
                        <span id="">客户类型：</span><input type="text" name="" id="" /><br/>
						<span id="">客户区域：</span><input type="text" name="" id="" /><br/>
						<span id="">年份：</span><input type="text" name="" id="" /><br/>
						<input type="submit" class="buttonstyle" style="margin-right: 70px;" value="设置保存" />
						<a><button class="buttonstyle bgred">取消操作</button></a>
					</form>
				</div>
				
			</div>
		</div>
		<script type="text/javascript">
			$(function(){
				var lis=document.getElementById('btnall').children;
				
				for(var i=0;i<lis.length;i++){
					lis[i].setAttribute('index',1);
					$('#btnall li em').attr('index',0);
				}
				
				$('#btnall li em').click(function(){
					
					var flag=$(this).attr('index');
//					console.log(typeof(flag));
					if(flag=='1'){
						$(this).parent().children('ul').slideUp(500);
						$(this).attr('index',0);
					}else if(flag=='0'){
						$(this).parent().children('ul').slideDown(500);
						$(this).attr('index',1);
					}
//					console.log(document.getElementById('btn').getAttribute('flag'));
				})
				$('#btnall li ul li').click(function(){
					console.log(1);
				})
				
				
			})
		</script>
	</body>
</html>
